@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        短信管理
        <small>短信任务列表</small>
        <small>添加</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li >短信管理</li>
        <li ><a href="/admin/message">短信任务列表</a></li>
        <li class="active">修改</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">

        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">广告添加</h3>
                    <div class="pull-right">
                        <a href="{{Route('admin.message.index')}}" type="button" class="btn btn-block btn-success btn-xs"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                {!! Form::model($message,['route'=>['admin.message.update',$message->id],'method'=>'put','class'=>'form-horizontal'])  !!}

                    <div class="box-body">

                        <div class="form-group @if($errors->has('content')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputEmail1">短信内容</label>
                            <div class="col-sm-3">
                                {!! Form::textarea('content',old('content'),array('class'=>'form-control','placeholder'=>'短信内容'))!!}
                            </div>
                            <div class="col-sm-3">
                                @if($errors->has('content'))
                                    <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('content')}}</label>
                                @endif
                            </div>
                        </div>



                        <div class="form-group @if($errors->has('send_object')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputEmail1">发送对象</label>
                            <div class="col-sm-3">
                                {!! Form::select('send_object',$send_object_arr,@$_GET['send_object'],['id'=>'send_object','class'=>'form-control','placeholder'=>'请选择发送对象'])!!}

                            </div>
                            <div class="col-sm-3">
                                @if($errors->has('send_object'))
                                    <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('send_object')}}</label>
                                @endif
                            </div>
                        </div>



                    </div>
                    <!-- /.box-body -->
                <div class="box-footer">
                    <div class="form-group no-padding">
                        <label class="col-sm-2 control-label">&nbsp;</label>
                        <div class="col-sm-3">
                            <button type="submit" class="btn btn-primary">保存</button>
                        </div>
                    </div>
                </div>
                {!! Form::close()  !!}

            <!-- /.box -->
        </div>
    </div>
</div>


</section>



<!-- /.content -->
@endsection